The present invention relates to apparatus for coding and decoding data transmitted in a series of frames, such as frames of moving-picture data, more particularly to methods of concealing errors when the data cannot be decoded correctly.
Coding methods that compress moving-picture data are described in, for example, recommendations H.261 and H.263 of the Telecommunication Standardization Sector of the International Telecommunication Union (ITU-T), and in standards that have been developed by the Moving Picture Experts Group (MPEG) and adopted by the International Organization for Standardization (ISO). These methods are used extensively in videoconferencing systems, video-on-demand (VOD) systems, and other moving-picture transmission systems.
In these coding methods, each frame of a moving picture is divided into eight-by-eight blocks or sixteen-by-sixteen macroblocks of picture elements (pixels). Blocks and macroblocks will both be referred to as xe2x80x98blocksxe2x80x99 below. Each block is coded by one of two general techniques: intra-frame coding, which codes the block independently; and inter-frame coding, which codes the block with reference to a block in a preceding frame, by coding the differences between corresponding pixel values in the two blocks. Inter-frame coding may include motion compensation. Regardless of which technique is used, the standard methods mentioned above employ an orthogonal transform, followed by quantization and entropy coding, to compress the block data. In each block, the orthogonal transform produces an average pixel value or average difference value for the block, referred to as a DC coefficient, and a set of values, referred to as AC coefficients, representing higher spatial frequencies.
Each block is preferably coded by the technique that produces the higher compression ratio. Usually, this is the inter-frame coding technique. Blocks coded by intra- and inter-frame coding will be referred to as intra-blocks and inter-blocks, respectively.
A general problem in moving-picture transmission systems is that the coded data may be corrupted by transmission errors, which can make correct decoding of the data impossible. Such errors have an unfortunate tendency to propagate, making it impossible to decode succeeding data as well. One reason is the variable length of the codewords employed in entropy coding. If a variable-length codeword is corrupted, the error can propagate into succeeding codewords by obscuring the boundaries between the codewords. Another reason is inter-frame coding. An error in one frame can propagate to the next frame by corrupting the reference data used in decoding inter-blocks.
To limit error propagation due to entropy coding, a common practice is to insert synchronization codes at certain positions in the coded data. To limit inter-frame error propagation, a common practice is to force each block to be coded by intra-frame coding at predetermined intervals, regardless of the compression ratio. A block coded in this way is referred to as a forced intra-block.
When a decoding error is detected, measures are taken to conceal the error. It is particularly important to conceal errors in intra-blocks, because the effect of these errors on picture quality can be severe. The effect of errors in inter-blocks is usually smaller, because the inter-block data values themselves are usually small.
One known error concealment method replaces an erroneous block with a corresponding block from the preceding frame: either the block in the same position in the preceding frame, or a block in a position specified by a motion vector. This method will be referred to as temporal replacement. Temporal replacement succeeds or fails, depending on the degree of similarity between the erroneous block and the replacement block.
Another known method replaces an erroneous block with a single DC value: either the DC value of the block itself, if this value can be recovered, or a value obtained from adjacent blocks. This method will be referred to as DC replacement. DC replacement avoids extreme picture distortion, but loses all detail within the replaced block.
Both of these methods have been applied to conceal errors in intra-blocks, but the results are unsatisfactory. With the temporal replacement method, severe picture distortion occurs whenever the replacement block happens to differ greatly from the erroneous block, and the severe distortion propagates by inter-frame coding into succeeding frames. With the DC replacement method, the probability of severe picture distortion is reduced, but the distortion that occurs is usually still obvious, and in many cases the distortion could have been avoided by temporal replacement. This is particularly true of forced intra-blocks, which often differ only slightly from the corresponding block in the preceding frame.
The DC replacement method does not reduce the probability of severe picture distortion to zero, because there may be an undetected error in the DC coefficient value itself. It is particularly unfortunate that the DC replacement method sometimes uses an incorrect DC coefficient value, causing unsightly picture distortion, when the error could have been concealed with little or no distortion by temporal replacement.
The present invention deals with the above error-concealment problems by using both the temporal replacement method and DC replacement method, selecting one method or the other on a block-by-block basis. A particular object of the invention is to provide appropriate criteria for choosing between the two methods for intra-blocks.
The invented error-concealment method includes decoding the AC component and DC component of each intra-block separately, and detecting decoding errors. When an error is detected, at least one of four conditions is tested: whether the DC coefficient is within a predicted range; whether the intra-block has a motion vector outside an acceptable range; whether the change in the motion vector is outside an acceptable range; and whether the intra-block was non-forced. The error is concealed by DC replacement if all of the tested conditions are satisfied, and by temporal replacement if any one of the tested conditions is not satisfied.
The tested condition(s) may be any one of the above four conditions, any combination of two or three of the conditions, or all four of the conditions.
When any of the first three conditions is used, the size of the predicted range or acceptable range may be adjusted in response to an external signal.
The invention also provides a decoder employing the invented error concealment method, and a transmission system including this decoder and a coder. If the non-forced intra-block condition is used, the coder includes a forced-intra signal transmitter that informs the decoder of forced intra-blocks.